# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-cgi
_pkgname=standard_cgi
pkgver=3.13.0
pkgrel=3
pkgdesc='Standard library cgi redistribution. "dead battery".'
arch=('any')
url='https://pypi.org/project/standard-cgi/#files'
license=('PSF-2.0')
depends=('python')
makedepends=('python-build' 'python-pip' 'python-wheel')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('0a842dd5b4e8f9e83a052d7b71da2817cce0d58cf5b73edb08ebfb5f4adcc198ec3876520b77a32f41001984345f1cc75e1126fe5aea482e44c4411d80b82fe9')

build() {
  cd "$_pkgname-$pkgver"

  python -m build --wheel --outdir="$startdir/dist"
}

package() {
  cd "$_pkgname-$pkgver"

  pip install \
    --verbose \
    --disable-pip-version-check \
    --no-warn-script-location \
    --ignore-installed \
    --no-compile \
    --no-deps \
    --root="$pkgdir" \
    --prefix=/usr \
    --no-index \
    --find-links="file://$startdir/dist" \
    $_pkgname
}

